//左边
function lefPprice() {
    var price = $("#lefPprice").val();
    if (price!=""){
        var reg_password = /^\d+(\.\d+)?$/;
        var flag = reg_password.test(price);
        if(flag){

        }else{
            $("#lefPprice").css("border","1px solid red");
            alert("输参数有误")
        }
        return flag;
    }

}
//右边
function rightPrice() {
    var price = $("#rightPrice").val();
    if (price != "") {
        var reg_password = /^\d+(\.\d+)?$/;
        var flag = reg_password.test(price);
        if(flag){

        }else{
            $("#rightPrice").css("border","1px solid red");
            alert("输参数有误")

        }
        return flag;
    }

}
//比较
function price() {
    var rightPrice = $("#rightPrice").val();
    var lefPprice = $("#lefPprice").val();
    if (rightPrice != ""&&lefPprice!=""){
        if (rightPrice == ""&&lefPprice!="") {
            lefPprice= Number(0);
            if (Number(lefPprice) >= Number(rightPrice)) {
                $("#rightPrice").val("");
                $("#lefPprice").val("");
                alert("输参数有误")
            }
        }else {
            if (Number(lefPprice) >= Number(rightPrice)) {
                $("#rightPrice").val("");
                $("#lefPprice").val("");
                alert("输参数有误")
            }
        }
    }

}
